 <script>
 //Checking if the values where set by the resource
  var formsubmitted = '<%#formsubmitted%>'
 if(formsubmitted == "1")
	{
		alert('Submitted sucessfully.');
		window.opener.document.getElementsByTagName("*")["hiddenactivityset"].value = <%#activitysetidentifier%>;
		window.opener.document.forms[0].submit();
		window.close();
	}
</script>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR>
		<TD class="N-TopLineBG"><IMG SRC="?drawimage=images/spacer.gif" WIDTH="10" HEIGHT="10"></TD>
    </TR>
    <TR>
		<TD >
			<TABLE cellspacing="1" cellpadding="5" border="0" width="100%">
				<TR Class="N-MainBGColor">
					<TD colspan="2" ><font class="heading2">Save Activity Set </Font>
					</TD>
				</TR>
				<TR  CLASS="N-ListBGCOLORCOL1">
					<TD width="49%" >
						<span class="runtext1"><span> Activity Set Name
						</span></span>
					</TD>
          			<TD width="51%" >
          				<input type="text" name="txtActivitySet" value="" class="input1">
					</TD>
				</TR>
				<!-- Gets loaded from ActivitySetListDetailsErr.htm -->
				<%#ErrActivitySetList%>
				<TR Class="N-MainBGColor">
					<TD Colspan="2" align="center">
						<INPUT TYPE="submit" value="Submit" class="button2" name="btnSubmit" onclick="return submitform()">
						<input type=hidden name="querybuildervaluehidden" value="">
						<input type=hidden name="displayquerybuildervaluehidden" value="">
					</TD>
				</TR>
			</TABLE>
		</TD>
	</TR>
	<TR>
      <TD Class = "N-LogoBG"><IMG SRC="?drawimage=images/spacer.gif" WIDTH="10" HEIGHT="10"></TD>
    </TR>
</TABLE>

<script>
function submitform()
		{

			if(document.getElementsByTagName("*")["txtActivitySet"].value == "")
			{
				alert('Please enter Activity Set Name.')
				return false;
			}
			else
			{
				document.getElementsByTagName("input")["querybuildervaluehidden"].value = window.opener.document.getElementsByTagName("input")["querybuildervaluehidden"].value;
				document.getElementsByTagName("input")["displayquerybuildervaluehidden"].value = window.opener.document.getElementsByTagName("input")["displayquerybuildervaluehidden"].value;
				return true;
			}
		}

</script>